<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>用户认证-用户中心</title>
<meta name="keywords"  content="DeathGhost" />
<meta name="description" content="DeathGhost" />
<meta name="author" content="DeathGhost,deathghost@deathghost.cn">
<link rel="icon" href="images/icon/favicon.ico" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="css/style.css" /><script src="js/html5.js"></script>
<script src="js/jquery.js"></script>
<script>
$(document).ready(function(){
  $("nav .indexAsideNav").hide();
  $("nav .category").mouseover(function(){
	  $(".asideNav").slideDown();
	  });
  $("nav .asideNav").mouseleave(function(){
	  $(".asideNav").slideUp();
	  });
  //favorite nav
  $(".tab_nav li").click(function(){
	   var liindex = $(".tab_nav li").index(this);
	   $(this).addClass("curr_li").siblings().removeClass("curr_li");
       $(".order_table").eq(liindex).fadeIn(150).siblings(".order_table").hide();
	  });
});
</script>
</head>
<body>
<!--header-->
<div id="app"> 
<header>
  <!--topNavBg-->
  <div class="topNavBg">
   <div class="wrap">
   <!--topLeftNav-->
    <ul class="topLtNav">
     <li v-if="checklogin"><a href="login.html" class="obviousText">亲，请登录</a></li>
     <li v-else><a href="login.html" class="obviousText">尊敬的{{userinfo.tel}},您好</a></li>
     <li><a href="register.html">注册</a></li>
     <li><a href="#">移动端</a></li>
    </ul>
   <!--topRightNav-->
    <ul class="topRtNav">
     <li><a href="user.html">个人中心</a></li>
     <li><a href="cart.html" class="cartIcon">购物车<i>0</i></a></li>
     <li><a href="favorite.html" class="favorIcon">收藏夹</a></li>
     <li><a href="user.html">商家中心</a></li>
     <li><a href="article_read.html" class="srvIcon">客户服务</a></li>
     <li><a href="union_login.html">联盟管理</a></li>
    </ul>
   </div>
  </div>
  <!--logoArea-->
  <div class="wrap logoSearch">
   <!--logo-->
   <div class="logo">
    <h1><img src="images/idid_ifrtgzddgm3dmnjshezdambqhayde_49x48.png"/></h1>
   </div>
   <!--search-->
   <div class="search">
    <ul class="switchNav">
     <li class="active" id="chanpin">产品</li>
     <li id="shangjia">商家</li>
     <li id="zixun">搭配</li>
     <li id="wenku">文库</li>
    </ul>
    <div class="searchBox">
     <form>
      <div class="inputWrap">
      <input type="text" placeholder="输入产品关键词或货号"/>
      </div>
      <div class="btnWrap">
      <input type="submit" value="搜索"/>
      </div>
     </form>
     <a href="#" class="advancedSearch">高级搜索</a>
    </div>
   </div>
  </div>
  <!--nav-->
  <nav>
<ul class="wrap navList">
<li class="category">
<a>全部产品分类</a>
</li>
<li>
<a href="index.html" class="active">首页</a>
</li>
<li>
<a href="#">时尚搭配</a>
</li>
<li>
<a href="channel.html">原创设计</a>
</li>
<li>
<a href="channel.html">时尚代购</a>
</li>
<li>
<a href="channel.html">民族风</a>
</li>
<li>
<a href="information.html">时尚搭配</a>
</li>
<li>
<a href="library.html">搭配知识</a>
</li>
<li>
<a href="#">促销专区</a>
</li>
<li>
<a href="#">其他</a>
</li>
</ul>
</nav>

 </header>
<section class="wrap user_center_wrap">
 <!--左侧导航-->
  <aside class="user_aside_nav">
  <!-- <dl>
   <dt>买家中心</dt>
   <dd><a href="order_list.html">我的订单</a></dd>
   <dd><a href="price_list.html">我的询价单</a></dd>
   <dd><a href="favorite.html">我的收藏</a></dd>
   <dd><a href="address.html">我的地址库</a></dd>
  </dl> -->
  <dl>
   <dt>商家管理中心</dt>
   <dd><a href="/user/authenticate.html">我要开店</a></dd>
   <dd><a href="/user/setting.html">店铺设置</a></dd>
   <dd><a href="/product/seller_product_list.html">商品列表</a></dd>
   <dd><a href="/order/seller_order_list.html">订单列表</a></dd>
   <dd><a href="/user/chat.html">用户咨询信息</a></dd>
  </dl>
  <!--<dl>
   <dt>控制面板</dt>
   <dd><a href="message.html">站内短消息</a></dd>
   <dd><a href="account.html">资金管理</a></dd>
   <dd><a href="profile.html">个人资料</a></dd>
   <dd><a href="change_password.html">修改密码</a></dd>
  </dl>  -->
 </aside>
 <!--右侧：内容区域-->
 <div class="user_rt_cont">
  <div class="top_title">
   <strong>开店认证申请</strong>
  </div>
  <ul class="tab_nav">
   <li class="curr_li">企业入驻</li>
   <li onclick="win()">个人入驻</li>
  </ul>
  <table class="order_table">
   <tr>
    <td width="100" align="right">真实姓名：</td>
    <td>
    <input type="text" class="textbox textbox_225" v-model="bname"/>
    <mark class="tips_errors">这里是提示性或错误信息</mark>
    </td>
   </tr>
   <tr>
    <td width="100" align="right">公司名称：</td>
    <td>
    <input type="text" class="textbox textbox_225" v-model="compang"/>
    <mark class="tips_errors">这里是提示性或错误信息</mark>
    </td>
   </tr>
   <tr>
    <td width="100" align="right">营业执照：</td>
    <td>
      <label class="uploadImg" >
       <input type="file" style="display:none;" @change="upload"/>
       <span v-if="pics">上传图片</span>
       <img :src="list[0]" v-else>
      </label>
      <mark class="tips_errors">这里是提示性信息</mark>
    </td>
   </tr>
   <tr>
    <td width="100" align="right">公司电话：</td>
    <td>
    <input type="text" class="textbox textbox_225" v-model="ctel"/>
    <mark class="tips_errors">这里是提示性或错误信息</mark>
    </td>
   </tr>
   <tr>
    <td width="100" align="right">公司详细地址：</td>
    <td>
    <textarea placeholder="内容" class="textarea" style="width:500px;height:50px;" v-model="address"></textarea>
    </td>
   </tr>
   <tr>
    <td width="100" align="right">联系人：</td>
    <td>
    <input type="text" class="textbox textbox_225" v-model="person"/>
    <mark class="tips_errors">这里是提示性或错误信息</mark>
    </td>
   </tr>
   <tr>
    <td width="100" align="right">联系电话：</td>
    <td>
    <input type="text" class="textbox textbox_225" v-model="ptel"/>
    <mark class="tips_errors">这里是提示性或错误信息</mark>
    </td>
   </tr>
   <tr>
    <td width="100" align="right"></td>
    <td>
    <input type="button" value="提交申请，等待审核" class="group_btn" @click="uptext()"/>
    </td>
   </tr>
  </table>
  <table class="order_table" style="display:none;">
   <tr>
    <td width="100" align="right">真实姓名：</td>
    <td>
    <input type="text" class="textbox textbox_225"  v-model="names"/>
    <mark class="tips_errors">这里是提示性或错误信息</mark>
    </td>
   </tr>
   <tr>
    <td width="100" align="right" @change="uploads">身份证正面照：</td>
    <td>
      <label class="uploadImg" >
       <input type="file" style="display:none;" @change="uploads"/>
       <span v-if="picss">上传图片</span>
       <img :src="lists[0]" v-else>
      </label>
      <mark class="tips_errors">这里是提示性信息</mark>
    </td>
   </tr>
   <tr>
    <td width="100" align="right" >详细地址：</td>
    <td>
    <textarea placeholder="内容" class="textarea" style="width:500px;height:50px;" v-model="addresss"></textarea>
    </td>
   </tr>
   <tr>
    <td width="100" align="right" >联系人：</td>
    <td>
    <input type="text" class="textbox textbox_225" v-model="persons"/>
    <mark class="tips_errors">这里是提示性或错误信息</mark>
    </td>
   </tr>
   <tr>
    <td width="100" align="right" >联系电话：</td>
    <td>
    <input type="text" class="textbox textbox_225" v-model="tels"/>
    <mark class="tips_errors">这里是提示性或错误信息</mark>
    </td>
   </tr>
   <tr>
    <td width="100" align="right"></td>
    <td>
    <input type="button" value="提交申请，等待审核" class="group_btn" @click="uptexts()"/>
    </td>
   </tr>
  </table>
 </div>
</section>
<!--footer-->
<footer>
 <!--help-->
 <ul class="wrap help">
  <li>
   <dl>
    <dt>消费者保障</dt>
    <dd><a href="article_read.html">保障范围</a></dd>
    <dd><a href="article_read.html">退换货流程</a></dd>
    <dd><a href="article_read.html">服务中心</a></dd>
    <dd><a href="article_read.html">更多服务特色</a></dd>
   </dl>
  </li>
  <li>
   <dl>
    <dt>新手上路</dt>
    <dd><a href="article_read.html">保障范围</a></dd>
    <dd><a href="article_read.html">退换货流程</a></dd>
    <dd><a href="article_read.html">服务中心</a></dd>
    <dd><a href="article_read.html">更多服务特色</a></dd>
   </dl>
  </li>
  <li>
   <dl>
    <dt>付款方式</dt>
    <dd><a href="article_read.html">保障范围</a></dd>
    <dd><a href="article_read.html">退换货流程</a></dd>
    <dd><a href="article_read.html">服务中心</a></dd>
    <dd><a href="article_read.html">更多服务特色</a></dd>
   </dl>
  </li>
  <li>
   <dl>
    <dt>服务保障</dt>
    <dd><a href="article_read.html">保障范围</a></dd>
    <dd><a href="article_read.html">退换货流程</a></dd>
    <dd><a href="article_read.html">服务中心</a></dd>
    <dd><a href="article_read.html">更多服务特色</a></dd>
   </dl>
  </li>
 </ul>
 <dl class="wrap otherLink">
  <dt>友情链接</dt>
  <dd><a href="http://www.htmlsucai.com" target="_blank">17素材</a></dd>
  <dd><a href="http://www.htmlsucai.com/pins/24448.html">HTML5模块化后台管理模板</a></dd>
  <dd><a href="http://www.htmlsucai.com/pins/15966.html">绿色清爽后台管理系统模板</a></dd>
  <dd><a href="http://www.htmlsucai.com/pins/14931.html">黑色的cms商城网站后台管理模板</a></dd>
  <dd><a href="http://www.deathghost.cn" target="_blank">前端博客</a></dd>
  <dd><a href="http://www.deathghost.cn" target="_blank">博客</a></dd>
  <dd><a href="http://www.deathghost.cn" target="_blank">新码笔记</a></dd>
  <dd><a href="http://www.deathghost.cn" target="_blank">DethGhost</a></dd>
  <dd><a href="#">当当</a></dd>
  <dd><a href="#">优酷</a></dd>
  <dd><a href="#">土豆</a></dd>
  <dd><a href="#">新浪</a></dd>
  <dd><a href="#">钉钉</a></dd>
  <dd><a href="#">支付宝</a></dd>
 </dl>
 <div class="wrap btmInfor"></div>
<p></p>
</footer></div>
<script src="js/jquery.js"></script>
 <script src="js/vue.js"></script>
<script src="js/axios.min.js"></script>
<script type="text/javascript" src="js/show-dialog.js"></script>
<script type="text/javascript" src="js/qs.js"></script>
<script>
	let app=new Vue({
		el:'#app',
		data:{
			mid:null,
			bname:null,
			compang:null,
			pics:true,
			ctel:null,
			person:null,
			ptel:null,
			address:null,
			list:[],
			userinfo:{},
			checklogin:true,
			names:null,
			addresss:null,
			persons:null,
			tels:null,
			lists:[],
			picss:true,
			check:false
		},
		methods:{
			uptexts(){
				showmsg("因为一些原因,暂不支持个人注册.....","green");
			},
			uptext(){
				if(this.mid==null){
					showmsg("暂无登录,请先登录.....","yellow",function(){location.href="login.html?authenticate.html"})
				}else{
					if(this.check){
						axios.post("/user/shop/joinshop",qs.stringify({mid:this.mid,cname:this.compang,ctel:this.ctel,person:this.person,ptel:this.ptel,addr:this.address})).then(rt=>{
							if(rt.data.code == 500){ //错误  ERROR
								showmsg("提交失败.....","red");
								return;
							}
							if(rt.data.code == 200 ){  //发送成功  SUCCESS
								showmsg("提交成功.....","green");
								return;
							}
						});
					}else{
						showmsg("已经提交过商店了....","yellow");
					}
				}
				
			},
			upload(e){
				console.log(e.target.files,"files");
				console.log(e,"e");
				for(let item of e.target.files){
					console.log(item.type);
					if(!/image\/\w+/.test(item.type)){
						alert("只能选择图片");
					}
						var _this=this;
						
						let reader=new FileReader();
						reader.readAsDataURL(item);
						reader.addEventListener('load',function(){
							_this.list.push(this.result);
							_this.pics=false;
						});
				}
			
			},
			uploads(e){
				console.log(e.target.files);
				console.log(e);
				for(let item of e.target.files){
					console.log(item.type);
					if(!/image\/\w+/.test(item.type)){
						alert("只能选择图片");
					}
						var _this=this;
						
						let reader=new FileReader();
						reader.readAsDataURL(item);
						reader.addEventListener('load',function(){
							_this.lists.push(this.result);
							
							_this.picss=false;
						});
				}
			
			}
		},
		created(){
			axios.post("/user/member/checklogin",null).then(rt=>{
				if(rt.data.code == 200){
					this.userinfo = rt.data.data;
					this.mid = rt.data.data.mid;
					console.log(this.mid,rt.data.data.mid);
					return;
				}
				if(rt.data.code == 511){
					showmsg(rt.data.message + ".....","yellow",function(){location.href="/user/login.html?/user/authenticate.html";})
				}
			})
			
			axios.post("/user/shop/check",null).then(rt=>{
				if(rt.data.code == 600){ //没有资源  NOT_DATA
					this.check = true;
					return;
				}
			})
		}
	});
	 $(document).ready(function(){
		   //测试效果，程序对接如需变动重新编辑
		   $(".switchNav li").click(function(){
		     $(this).addClass("active").siblings().removeClass("active");
		     });
		   $("#chanpin").click(function(){
		     $(".inputWrap input[type='text']").attr("placeholder","输入产品关键词或货号");
		     });
		   $("#shangjia").click(function(){
		     $(".inputWrap input[type='text']").attr("placeholder","输入商家店铺名");
		     });
		   $("#zixun").click(function(){
		     $(".inputWrap input[type='text']").attr("placeholder","输入关键词查找文章内容");
		     });
		   $("#wenku").click(function(){
		     $(".inputWrap input[type='text']").attr("placeholder","输入关键词查找文库内容");
		     });
		   });
		   
	 function win(){
		 showmsg("因为一些原因,暂不支持个人注册.....","green");
	 }
</script>
  </body>
  </html>
  